package com.lingnan.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lingnan.entity.po.CommunityComment;
import com.lingnan.entity.po.CommunityPost;
import org.springframework.transaction.annotation.Transactional;

public interface ICommunityService {


    Long createPost(CommunityPost post);
    boolean deletePost(Long postId);
    CommunityPost getPostById(Long postId);
    Long createComment(CommunityComment comment);
    boolean deleteComment(Long commentId);
    Page<CommunityComment> listCommentsByPost(Long postId, int pageNum, int pageSize, String sortBy);
    Page<CommunityPost> listPosts(int pageNum, int pageSize, String sortBy);
    boolean likePost(Long postId);
    boolean likeComment(Long commentId);
}
